package com.rul.mars.mbg.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 搜索服务的商品信息
 * Created by macro on 2018/6/19.
 */
@Data
@Document(indexName = "mars", type = "product", shards = 1, replicas = 0)
public class EsProduct implements Serializable {
    private static final long serialVersionUID = -1L;

    @Id
    private Long id;

    private Long shopId;

    private Long categoryId;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String name;

    private String pic;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String keywords;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String detail;

}
